package com.yq.design.command;

/**
 * @ClassName Onlight
 * @Description 接受者
 * @Author yaoqiang
 * @Date 2021/8/20 15:36
 * @Version 1.0
 */
public class Onlight implements Command {
    Light light;

    @Override
    public void execute() {
        light.on();
    }

    @Override
    public void undo() {
        light.off();
    }
    public Onlight(Light light) {
        this.light = light;
    }
}
